<?php

namespace App\Observers;

use App\Models\Department;
use Illuminate\Support\Facades\DB;

class DepartmentObserver
{
    function deleted(Department $department)
    {
        DB::table('user_has_department')
            ->where('department_id', $department->id)
            ->delete();
    }
}
